package com.yixq.soa.service.comm.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by zjp on 2017/5/24.
 * App授权通知
 */
public enum AppAuthNotifyType {
    AUTH_ALARM(1, "授权提醒"),
    AUTH_CANCELED_EXPIRED(4, "授权取消/已过期提醒");

    private static Map<Integer, AppAuthNotifyType> map = new HashMap<Integer, AppAuthNotifyType>();

    static {
        for (AppAuthNotifyType e : AppAuthNotifyType.values()) {
            map.put(e.getTypeId(), e);
        }
    }

    private Integer typeId;
    private String name;

    AppAuthNotifyType(Integer typeId, String name) {
        this.typeId = typeId;
        this.name = name;
    }

    public static AppAuthNotifyType getName(Integer typeId) {
        return map.get(typeId);
    }

    public Integer getTypeId() {
        return typeId;
    }

    public String toString() {
        return this.name;
    }

    public String getName() {
        return this.name;
    }
}
